<html>
<head>
<script type="text/javascript">
  var count = 0;
  function runXHR() {
    var xhr = new XMLHttpRequest();
    xhr.addEventListener("load", transferComplete, false);
    xhr.open('GET', 'http:/localhost:0/check', false);
    xhr.send();
  }
  function transferComplete(event) {
    count += 1;
    document.getElementById("counter").innerHTML = count;
  }

  setInterval('runXHR();', Math.floor((Math.random() * 10) + 45));
</script>
</head><body>
<div>Hello</div><div id=counter>0</div>
</body></html>
